package com.example.Holo.core;

import android.app.Application;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import com.example.Holo.rework.dao.implementation.sqlite.android.SQLiteDaoFactory;
import com.example.Holo.rework.dao.interfaces.IDaoFactory;
import com.example.Holo.rework.services.implementation.ServiceFactory;
import com.example.Holo.rework.services.interfaces.IServiceFactory;

public class BaseApplication extends Application {

    public static final String DATABASE_NAME = "holo-events_3";

    private IServiceFactory serviceFactory;
    private long eventId;

    @Override
    public void onCreate() {
        super.onCreate();
        final IDaoFactory daoFactory = new SQLiteDaoFactory(this, DATABASE_NAME);
        serviceFactory = new ServiceFactory(daoFactory);
    }

    public final IServiceFactory getServiceFactory() {
        return serviceFactory;
    }

    public long getEventId() {
        return eventId;
    }

    public void setEventId(long eventId) {
        this.eventId = eventId;
    }

}
